home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / prog_c / cuj0696.zip / DWYER.ZIP / GAP.TST / GAPDEFS.H < prev    next >
C/C++ Source or Header  |  1996-03-26  |  2KB  |  72 lines

  1. /* ============ */
  2. /* gapdefs.h    */
  3. /* ============ */
  4. /* ==================================================================== */
  5. /*               TYPEDEFS, #DEFINES AND PROTOTYPES FOR GAP TEST        */
  6. /* ==================================================================== */
  7. # if defined(__GAPDEFS_H__)
  8. #    /* Do Nothing */
  9. # else
  10. #    define    __GAPDEFS_H__
  11.  
  12. # if !defined(__DEFCODES)
  13.  
  14. typedef    unsigned char        UCHAR;
  15. typedef    unsigned int        UINT;
  16.  
  17. #define    FALSE    0
  18. #define    TRUE    1
  19. # endif
  20.  
  21. #define MAX_CELL_XPCT        100    /* Max. Expected Counts/Cell    */
  22. #define MIN_CELL_XPCT        5
  23. #define    MAX_GAP_LEN        100    /* Max. No. Variates Per Gap    */
  24. #define    MIN_GAP_LEN        2
  25. #define    MAX_NUM_GAPS        65535L
  26. #define    MIN_NUM_GAPS        10
  27.  
  28. /* ------------------- */
  29. /* FUNCTION PROTOTYPES */
  30. /* ------------------- */
  31. # undef F
  32. # if defined(__STDC__) || defined(__PROTO__)
  33. #    define  F( P )  P
  34. # else
  35. #    define  F( P )  ()
  36. # endif
  37.  
  38. /* INDENT OFF */
  39. typedef    struct    GapDataStru
  40.     {
  41.     int    NumCategories;    /* No. Categories to Receive Tallies    */
  42.     int    UserCellExpect;    /* User-Minimum Cell Expectation    */
  43.     int    MaxGapLen;    /* Maximum Length of Tabulated Gap    */
  44.     long    NumGaps;    /* Number of Gaps to be Tabulated    */
  45.     long    TotNumGen;    /* Number Variates Generated This Run    */
  46.     long    UserNumGaps;    /* No. Gaps to meet UserCellExpect    */
  47.     long    IdealNumGaps;    /* No. Gaps to meet MIN_CELL_XPCT    */
  48.     long    MaxGenPerGap;    /* FAILURE Criteria for Generator    */
  49.     long    ActMaxPerGap;    /* Actual Maximum Generated for Gaps    */
  50.     int    CallStatusOK;    /* 0 = FALSE, 1 = TRUE            */
  51.     int    NotEnough;    /* # Categories < UserCellExpect    */
  52.     UINT    LoGapInt;    /* (RAND_MAX+1) * GapLoLimit            */
  53.     UINT    HiGapInt;    /* (RAND_MAX+1) * GapHiLimit            */
  54.     double    GapLoLimit;    /* Lower Boundary on Specified Gap    */
  55.     double    GapHiLimit;    /* Upper Boundary on Specified Gap    */
  56.     double    *CellExpect;    /* Calculated Cell Expectations     */
  57.     double    GapChiSq;    /* Gap-Run Chi-Square Data        */
  58.     int    (*RandFun) F((void));/* Addr. of Generating Function    */
  59.     }
  60.     GAP_DATA_STRU;
  61.  
  62. extern    void    CalcGapProbs F((int, double, double, double *));
  63. extern    void    CalcGapMeanStdDev F((int, double, double *, double *));
  64. extern    void    CalcGapChiSq F((struct GapDataStru *));
  65. extern    UINT    GenGapData F((struct GapDataStru *));
  66. extern    void    SetGapControls F((struct GapDataStru *));
  67.  
  68. # undef F
  69. /* INDENT ON */
  70.  
  71. # endif                /* <<< __GAPDEFS_H__ >>> */
  72.